import rxAjax from "@/assets/js/ajax.js";

export const FormApi = {};

FormApi.invoke= function(alias,params){
    var url="/api-form/form/core/formInvokeScript/invoke/"+alias;
    return rxAjax.postJson(url,params);
}

FormApi.queryForJson=function(sqlKey,params) {
    let url= "/api-form/form/core/formCustomQuery/queryForJson_"+sqlKey;
    return rxAjax.postForm(url,params);
}

FormApi.loadByGrant=function(typeId){
    let url = "/api-form/form/core/formEntityDataSetting/queryData_"+typeId;
    return rxAjax.get(url);
}


FormApi.loadDicByPidAndDicId=function(dicKey,parentId) {
    let url= "/api-system/system/core/sysDic/getByPidAndDicId";
    let params={dicKey:dicKey,parentId:parentId};
    return rxAjax.get(url,params);
}


export  default FormApi;
